Async Prediction For Image File
AutomatR.Nanonets.Activities.AsyncPredictionForImageFile
The "Async Prediction For Image File" activity in AutomatR is part of the Nanonets OCR activities package, facilitating Optical Character Recognition (OCR) predictions on an image using the Nanonets OCR model. This activity allows you to perform asynchronous predictions, enabling you to upload an image for processing and query the results with a unique ID at a later point in time.
Properties
Name | Description |
---|---|
Input | |
Async | Specifies whether you want to perform asynchronous processing. Enter either (true) or (false). String variables containing the value "true" or "false". |
Image Path | Specifies the file path of the image for which OCR predictions will be made. String variables containing the image file path. |
Model ID | The ID of the Nanonets OCR model to use for prediction. String variables containing the model ID. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Async Prediction For Image File" activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Response | Outputs the detailed response generated by the Nanonets OCR model based on the provided image. The response includes properties related to asynchronous prediction for image files. Variables of type AsyncPredictionForImageFileProperties to store the response. |
How to use:
- Drag and drop the "Async Prediction For Image File" activity onto the workflow.
- Configure the properties by specifying the model ID, image file path, and whether to perform asynchronous processing.
- Optionally, configure the delay.
- Execute the workflow to perform OCR predictions on the specified image using the Nanonets OCR model asynchronously.
Example: Consider an example where the "Async Prediction For Image File" activity is used to perform OCR predictions on an image named "example.jpg" using the Nanonets OCR model:
Async Prediction For Image File:
Model ID: "your_model_id"
Image Path: "C:\Images\example.jpg"
Async: "true"
Response: OCRResponse
In this example, the activity uploads the "example.jpg" image for asynchronous processing using the specified Nanonets OCR model. The detailed response generated by the model is stored in the variable "OCRResponse" for further handling in the workflow.